﻿@model IEnumerable<TelerikedIn.WebApp.ViewModels.User.UserVM>
@if (Model == null || Model.Count() == 0)
{
    <span class="text-warning">No users matching that search and NOT connected already found!</span>
}
else
{
    <ul>
        @foreach (var item in Model)
        {
            <li id="user-@item.Id" >
                @(Ajax.ActionLink("Add " + item.FullName, "AddUser", new { id = item.Id }, new AjaxOptions
                {
                    InsertionMode = InsertionMode.Replace,
                    UpdateTargetId = "user-" + item.Id,
                    OnSuccess = "refreshUsers"
                }))
            </li>
        }
    </ul>
}